<%--
    Document   : template
    Created on : Mar 24, 2011, 5:16:47 PM
    Author     : Javier Snaider
--%>

<%@page contentType="text/html" pageEncoding="UTF-8"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
    "http://www.w3.org/TR/html4/loose.dtd">

<%@ taglib uri="http://struts.apache.org/tags-bean" prefix="bean" %>
<%@ taglib uri="http://struts.apache.org/tags-html" prefix="html" %>
<%@ taglib uri="http://struts.apache.org/tags-logic" prefix="logic" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>

<html>
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
        <title><bean:message key="welcome.title"/></title>
        <link rel="stylesheet" href="${pageContext.servletContext.contextPath}/css/template_css.css" media="screen"
              type="text/css" />
        <html:base/>

        <!-- calendar stylesheet -->
        <link rel="stylesheet" type="text/css" media="all" href="${pageContext.servletContext.contextPath}/js/calendar-win2k-cold-1.css" title="win2k-cold-1" />

        <!-- main calendar program -->
        <script type="text/javascript" src="${pageContext.servletContext.contextPath}/js/calendar.js"></script>

        <!-- language for the calendar -->
        <script type="text/javascript" src="${pageContext.servletContext.contextPath}/js/lang/calendar-en.js"></script>

        <!-- the following script defines the Calendar.setup helper function, which makes
             adding a calendar a matter of 1 or 2 lines of code. -->
        <script type="text/javascript" src="${pageContext.servletContext.contextPath}/js/calendar-setup.js"></script>


    </head>
    <body>
        <div class="container">
            <div class="header">
                <a href="#"><img src="${pageContext.servletContext.contextPath}/img/grlg.png" alt="Insert_logo" name="Insert_logo" width="180" height="90" id="Insert_logo" style="background: #C6D580; display:block;"></a>
            </div><!-- end .header -->
            <div class="content">




                <!-- YOUR CODE HERE -->
                <table border="0" cellspacing="0">
                    <tbody>
                        <tr>
                            <td><h1> Reward Plan</h1></td>
                        </tr>
                        <tr>
                            <td>Please input Customer Information for registration below.</td>
                        </tr>
                    </tbody>
                </table>

                <html:form action="/RegisterRewardInputValidate">

                    <table border="0" cellspacing="0">
                        <tbody>
                            <tr>
                                <td align="right">User Name&nbsp;</td>
                                <td align="left"><html:text property="userName" /></td>
                                <td><font color="red"><html:errors property="username" /></font></td>
                            </tr>
                            <tr>
                                <td align="right">Password&nbsp;</td>
                                <td align="left"><html:password property="password" /></td>
                                <td><font color="red"><html:errors property="password" /></font></td>
                            </tr>
                            <tr>
                                <td align="right">First Name&nbsp; </td>
                                <td align="left"><html:text property="name" /></td>
                                <td><font color="red"><html:errors property="name" /></font></td>
                            </tr>
                            <tr>
                                <td align="right">Last Name&nbsp;</td>
                                <td align="left"><html:text property="familyName" /></td>
                                <td><font color="red"><html:errors property="familyname" /></font></td>
                            </tr>
                            <tr>
                                <td align="right">Birthday&nbsp;</td>
                                <td align="left"><html:text  styleId="dateString" property="dateString" />
                                    <img alt="cal"  src="${pageContext.servletContext.contextPath}/js/imgcal.gif" id="f_trigger_b" style="cursor: pointer; border: 1px solid red;" title="Date selector"
                                         onmouseover="this.style.background='red';" onmouseout="this.style.background=''" />
                                </td>
                                <td><font color="red"><html:errors property="birthday" /></font></td>
                            </tr>
                            <tr>
                                <td align="right">Phone Number&nbsp;</td>
                                <td align="left"><html:text property="phone" /></td>
                                <td><font color="red"><html:errors property="phone" /></font></td>
                            </tr>
                            <tr>
                                <td align="right">Email&nbsp;</td>
                                <td align="left"><html:text property="email" /></td>
                                <td><font color="red"><html:errors property="emailNull" /></font>
                                    <font color="red"><html:errors property="emailInvaild" /></font>
                                </td>
                            </tr>
                            <tr>
                                <td align="right">Address&nbsp;</td>
                                <td align="left"><html:text property="address" /></td>
                                <td><font color="red"><html:errors property="address" /></font></td>
                            </tr>
                        </tbody>
                    </table>

                    <table border="0" cellspacing="0">
                        <tbody>
                            <tr>
                                <td>
                                    <input type="checkbox" name="checkbox"  value="checkbox"
                                           onClick="if(this.checked==true){Submit.disabled=false;}else{Submit.disabled=true;}">
                                    I agree with that register REWARD plan with above information.
                                </td>
                                <td>

                                    <input type="submit" name="Submit" id="Submit" disabled value="OK">
                                    <input type="button" value="Back" onclick="location.href='../mainMenu.jsp'"></td>
                            </tr>
                        </tbody>
                    </table>


                </html:form>



            </div><!-- end .content -->
        </div><!-- end .container -->
        <div class="footer">
            <p>Copyright 2011&nbsp;TigerSoft</p>
        </div><!-- end .footer -->
        <script type="text/javascript">
            Calendar.setup({
                inputField     :    "dateString",      // id of the input field
                ifFormat       :    "%m/%d/%Y",       // format of the input field
                button         :    "f_trigger_b",   // trigger for the calendar (button ID)
                step           :    1                // show all years in drop-down boxes (instead of every other year as default)
            });
        </script>
    </body>
</html>